import {Reducer} from 'redux';

interface HomeModelType {
  namespace: string;
  state: HomeModelState;
  reducers: {
    setState: Reducer<HomeModelState>;
  };
}

interface HomeModelState {
  carouselList: string[];
}

const initialState: HomeModelState = {
  carouselList: [
    'https://img.mukewang.com/5f6805710001326c18720764.jpg',
    'https://img.mukewang.com/5f5ade540001e7f718720764.jpg',
    'https://img.mukewang.com/5f057a6a0001f4f918720764.jpg',
  ],
};

const Home: HomeModelType = {
  namespace: 'home',
  state: initialState,
  reducers: {
    setState(state, {payload}) {
      return {...state, ...payload};
    },
  },
};

export default Home;
